3.1161 \(\int \frac{(b d+2 c d x)^2}{\left (a+b x+c x^2\right )^2} \, dx\)

Optimal. Leaf size=62 \[ -\frac{4 c d^2 \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c}}-\frac{d^2 (b+2 c x)}{a+b x+c x^2} \]

[Out]

-((d^2*(b + 2*c*x))/(a + b*x + c*x^2)) - (4*c*d^2*ArcTanh[(b + 2*c*x)/Sqrt[b^2 -
 4*a*c]])/Sqrt[b^2 - 4*a*c]

_______________________________________________________________________________________

Rubi [A]  time = 0.0927327, antiderivative size = 62, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125 \[ -\frac{4 c d^2 \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c}}-\frac{d^2 (b+2 c x)}{a+b x+c x^2} \]

Antiderivative was successfully verified.

[In]  Int[(b*d + 2*c*d*x)^2/(a + b*x + c*x^2)^2,x]

[Out]

-((d^2*(b + 2*c*x))/(a + b*x + c*x^2)) - (4*c*d^2*ArcTanh[(b + 2*c*x)/Sqrt[b^2 -
 4*a*c]])/Sqrt[b^2 - 4*a*c]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 19.1845, size = 60, normalized size = 0.97 \[ - \frac{4 c d^{2} \operatorname{atanh}{\left (\frac{b + 2 c x}{\sqrt{- 4 a c + b^{2}}} \right )}}{\sqrt{- 4 a c + b^{2}}} - \frac{d^{2} \left (b + 2 c x\right )}{a + b x + c x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((2*c*d*x+b*d)**2/(c*x**2+b*x+a)**2,x)

[Out]

-4*c*d**2*atanh((b + 2*c*x)/sqrt(-4*a*c + b**2))/sqrt(-4*a*c + b**2) - d**2*(b +
 2*c*x)/(a + b*x + c*x**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0693397, size = 65, normalized size = 1.05 \[ d^2 \left (\frac{4 c \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )}{\sqrt{4 a c-b^2}}+\frac{-b-2 c x}{a+b x+c x^2}\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[(b*d + 2*c*d*x)^2/(a + b*x + c*x^2)^2,x]

[Out]

d^2*((-b - 2*c*x)/(a + b*x + c*x^2) + (4*c*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]
])/Sqrt[-b^2 + 4*a*c])

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 77, normalized size = 1.2 \[ -2\,{\frac{c{d}^{2}x}{c{x}^{2}+bx+a}}-{\frac{{d}^{2}b}{c{x}^{2}+bx+a}}+4\,{\frac{c{d}^{2}}{\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((2*c*d*x+b*d)^2/(c*x^2+b*x+a)^2,x)

[Out]

-2*d^2/(c*x^2+b*x+a)*c*x-d^2/(c*x^2+b*x+a)*b+4*d^2*c/(4*a*c-b^2)^(1/2)*arctan((2
*c*x+b)/(4*a*c-b^2)^(1/2))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((2*c*d*x + b*d)^2/(c*x^2 + b*x + a)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.214092, size = 1, normalized size = 0.02 \[ \left [\frac{2 \,{\left (c^{2} d^{2} x^{2} + b c d^{2} x + a c d^{2}\right )} \log \left (-\frac{b^{3} - 4 \, a b c + 2 \,{\left (b^{2} c - 4 \, a c^{2}\right )} x -{\left (2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{2} + b x + a}\right ) -{\left (2 \, c d^{2} x + b d^{2}\right )} \sqrt{b^{2} - 4 \, a c}}{{\left (c x^{2} + b x + a\right )} \sqrt{b^{2} - 4 \, a c}}, \frac{4 \,{\left (c^{2} d^{2} x^{2} + b c d^{2} x + a c d^{2}\right )} \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) -{\left (2 \, c d^{2} x + b d^{2}\right )} \sqrt{-b^{2} + 4 \, a c}}{{\left (c x^{2} + b x + a\right )} \sqrt{-b^{2} + 4 \, a c}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((2*c*d*x + b*d)^2/(c*x^2 + b*x + a)^2,x, algorithm="fricas")

[Out]

[(2*(c^2*d^2*x^2 + b*c*d^2*x + a*c*d^2)*log(-(b^3 - 4*a*b*c + 2*(b^2*c - 4*a*c^2
)*x - (2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c)*sqrt(b^2 - 4*a*c))/(c*x^2 + b*x + a))
- (2*c*d^2*x + b*d^2)*sqrt(b^2 - 4*a*c))/((c*x^2 + b*x + a)*sqrt(b^2 - 4*a*c)),
(4*(c^2*d^2*x^2 + b*c*d^2*x + a*c*d^2)*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)/(b
^2 - 4*a*c)) - (2*c*d^2*x + b*d^2)*sqrt(-b^2 + 4*a*c))/((c*x^2 + b*x + a)*sqrt(-
b^2 + 4*a*c))]

_______________________________________________________________________________________

Sympy [A]  time = 3.03254, size = 209, normalized size = 3.37 \[ - 2 c d^{2} \sqrt{- \frac{1}{4 a c - b^{2}}} \log{\left (x + \frac{- 8 a c^{2} d^{2} \sqrt{- \frac{1}{4 a c - b^{2}}} + 2 b^{2} c d^{2} \sqrt{- \frac{1}{4 a c - b^{2}}} + 2 b c d^{2}}{4 c^{2} d^{2}} \right )} + 2 c d^{2} \sqrt{- \frac{1}{4 a c - b^{2}}} \log{\left (x + \frac{8 a c^{2} d^{2} \sqrt{- \frac{1}{4 a c - b^{2}}} - 2 b^{2} c d^{2} \sqrt{- \frac{1}{4 a c - b^{2}}} + 2 b c d^{2}}{4 c^{2} d^{2}} \right )} - \frac{b d^{2} + 2 c d^{2} x}{a + b x + c x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((2*c*d*x+b*d)**2/(c*x**2+b*x+a)**2,x)

[Out]

-2*c*d**2*sqrt(-1/(4*a*c - b**2))*log(x + (-8*a*c**2*d**2*sqrt(-1/(4*a*c - b**2)
) + 2*b**2*c*d**2*sqrt(-1/(4*a*c - b**2)) + 2*b*c*d**2)/(4*c**2*d**2)) + 2*c*d**
2*sqrt(-1/(4*a*c - b**2))*log(x + (8*a*c**2*d**2*sqrt(-1/(4*a*c - b**2)) - 2*b**
2*c*d**2*sqrt(-1/(4*a*c - b**2)) + 2*b*c*d**2)/(4*c**2*d**2)) - (b*d**2 + 2*c*d*
*2*x)/(a + b*x + c*x**2)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.215583, size = 89, normalized size = 1.44 \[ \frac{4 \, c d^{2} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c}} - \frac{2 \, c d^{2} x + b d^{2}}{c x^{2} + b x + a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((2*c*d*x + b*d)^2/(c*x^2 + b*x + a)^2,x, algorithm="giac")

[Out]

4*c*d^2*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/sqrt(-b^2 + 4*a*c) - (2*c*d^2*x +
 b*d^2)/(c*x^2 + b*x + a)